FactoryGirl.define do
  factory :user do
    sequence(:name) { |n| "foo#{n}" }
    full_name "This me"
    password "foobar"
    password_confirmation { |u| u.password }
    email { "#{name}@example.com" }

    factory :user_email do
      email ""
    end
  end

  factory :book do
    sequence(:name) { |n| "book#{n}" }
    numbers 12
    numbers_to_borrow 0
    author "Fukotaji"
    category

  end

  factory :category do
    sequence(:name) { |n| "category#{n}" }
  end
end